#include<stdio.h>
#include<conio.h>

int main()
{
    int time=0, a[100], i, n, index;
    printf("Enter the number of elements in your array: ");
    scanf("%d", &n);
    for (i=0; i<n; i++)
    {
        printf("\n Element no.%d: ", i);
        scanf("%d", &a[i]);
        }   
    printf("Enter the number you want to count the time it appears in this array: ");
    scanf("%d", &index);
    
    for (i=0; i<n; i++)
    {
        if(a[i]==index) time+=1;
        }
        printf("%d appears %d time in this array", index, time);
        getch();
}
